import { defineStore } from 'pinia';
import type * as Temp from '@/views/dimensioning/project/hooks1/type';
import type { LesionState } from './type';

const useMarkLesionStore = defineStore('markLesion', {
  state: (): LesionState => ({
    currentLesion: {
      id: '',
      name: '',
      lesion: '',
      color: '',
      eyeStatus: true,
      toolList: [],
      list: {
        formId: 0,
        form: {},
        formOptions: [],
      },
    },
  }),
  getters: {
    currentItem(state: LesionState): LesionState {
      return { ...state };
    },
  },
  actions: {
    setCurrentItem(item: Temp.NidusItem) {
      this.currentLesion = item;
    },
  },
});

export default useMarkLesionStore;
